#ifndef SERVICE_H
#define SERVICE_H

#include "FreeRTOS.h"
#include "task.h"
#include "main.h"
#include "cmsis_os.h"
// #include "tim.h"
#include "foc.h"
#include "fdcan.h"

#define MOTOR0_ID 0x100
#define MOTOR1_ID 0x101
#define MOTOR2_ID 0x102
#define MASTER_ID 0x001

#define LOCAL_ID MOTOR0_ID

extern TaskHandle_t focTaskHandle;
extern TaskHandle_t pidTaskHandle;
extern TaskHandle_t monitorTaskHandle;
//extern float position_target;
//extern float motor_target;
extern uint32_t canReceiveCounter;
extern uint32_t uartReceiveCounter;

void foc_task(void *params);

void pid_task(void *params);

void monitor_task(void *params);

#endif // SERVICE_H
